VAS.TreePanel=Ext.extend(Ext.tree.TreePanel,{
   initComponent:function(){
   	   	var _this=this;
   	
	   	var loader = new Ext.tree.TreeLoader({dataUrl:_this.url,baseParams:_this.params});
	  	loader.on('load',function($this, $node, $response ){
	      	var result=Ext.decode($response.responseText);
	      	if(result.failure!='undefined'&&result.failure){
	      		Ext.Msg.alert('提示',result.msg,function() {
	      			if(result.callback!='undefined'){
	          			eval(result.callback);
	      			}
	          	});
	      	}
		});		

    	var config={    	
//			height : 300,
			useArrows : true,
			autoScroll : true,
			animate : true,
			enableDD : true,
			containerScroll : true,
			rootVisible : false,
			frame : true,
			root : {
				nodeType : 'async'
				,id   : "root"
			},
//			dataUrl : _this.url
			 loader: loader  //new Ext.tree.TreeLoader({dataUrl:_this.url,baseParams:_this.params})
    	}	
 	
 Ext.apply(this, config);
 Ext.apply(this.initialConfig, config);
 VAS.TreePanel.superclass.initComponent.apply(this, arguments); 
   }})
   
 Ext.reg('treePanel-vas', VAS.TreePanel);